<include file="Public:pageheader" />
<script type="text/javascript">
function changevalue(value){
	$("#class2").empty();
	$("#class2").append('<option>--选择市--</option>');
	var slt=document.getElementById("class2");
	$.get('__URL__/selectcity',{rand:Math.random(),province_id:value},function(msg){
		msg = eval(msg);
				for(var i in msg){
					  
					   var objOption=document.createElement("OPTION");
					   objOption.value=msg[i].id;
					   objOption.text=msg[i].name;
					   slt.add(objOption);				
				}
				
		}
	);
	
}
function changevalue2(value){
	$("#class3").empty();
	$("#class3").append('<option>--选择区--</option>');
	var slt=document.getElementById("class3");
	$.get('__URL__/selectarea',{rand:Math.random(),city_id:value},function(msg){
		msg = eval(msg);
				for(var i in msg){
					  
					   var objOption=document.createElement("OPTION");
					   objOption.value=msg[i].id;
					   objOption.text=msg[i].name;
					   slt.add(objOption);				
				}
				
		}
	);
	
}
</script>
<div class="content-box">
	<div class="content-box-header">
	<h3>{$Think.lang.edit_deposit}</h3>
	<div class="clear"></div>
	</div>
	<div class="content-box-content">
		<form action="__URL__/update" method="post" enctype="multipart/form-data">
			<fieldset>
			<volist name="list" id="vo">
			<p>
			<input class="text-input small-input" type="hidden" name="type_id" value="1"/>
			</p>
			<p>
			<label>*{%name}:</label>
			<input class="text-input small-input" type="text" name="name" value="{$vo.name}"/>
			</p>
			<p>
			<label>*{%graveyard_id}:</label>
			<input class="text-input small-input" type="text" name="graveyard_id" value="{$vo.graveyard_id}"/>
			</p>
			<p>
			<label>*{%gender}：</label>
			<input type="radio" name="gender" value="1" checked="checked"/>男
			<input type="radio" name="gender" value="0"/>女
			</p>
			<p>
			<label>*{%age}:</label>
			<input class="text-input small-input" type="text" name="age" value="{$vo.age}"/>	
			</p>
			<p>
			<label>{%charge_person_id}：</label>
			<input class="text-input small-input" type="text" name="charge_person_id" value="{$vo.charge_person_id}"/>
			</p>
			<p>
			<label>*{%relations_with_charge_person}：</label>
			<input class="text-input small-input" type="text" name="relations_with_charge_person" value="{$vo.relations_with_charge_person}"/>
			</p>
			<p>
			<label>*{%born_time}：</label>
			<input class="text-input small-input" type="text" name="born_time" value="{$vo.born_time|date="Y-m-d H:i:s",###}"/>
			</p>
			<p>
			<label>*{%dead_time}:</label>
			<input class="text-input small-input" type="text" name="dead_time" value="{$vo.dead_time|date="Y-m-d H:i:s",###}"/>	
			</p>
			<p>
			<label>{%address}：</label>
			<input class="text-input small-input" type="text" name="address" value="{$vo.address}"/>
			</p>
			<p>
			<label>{%dead_number}：</label>
			<input class="text-input small-input" type="text" name="dead_number" value="{$vo.dead_number}"/>
			</p>
			<p>
			<label>{%image_url}:</label>
			<input type="file" name="image_url"/><img src="__PUBLIC__/Uploads/{$vo.image_url}">
			</p>
			<p>
			<label>{%native}:</label>
						<select name="province_id" id="class1" onchange="changevalue(this.value)">
				<option>--请选择--</option>
				<volist name="province" id="omit">
				<option value="{$omit.id}">{$omit.name}</option>
				</volist>
			</select>
			<select name="city_id" id="class2" onchange="changevalue2(this.value)">
			<option>--选择市--</option>

			</select>市
			<select name="area_id" id="class3">
			<option>--选择区--</option>
			</select>区
			</p>
			</p>
			<p>
			<label>{%job}：</label>
			<input class="text-input small-input" type="text" name="job" value="{$vo.job}"/>
			</p>
			<p>
			<label>{%introduction}:</label>
			<textarea name="introduction">{$vo.introduction}</textarea>
			</p>
			<p>
			<label>{%remark}：</label>
			<textarea name="remark">{$vo.remark}</textarea>
			</p>
			<p>
			<input type="hidden" value="{$operator}" name="creater_name"/>
			</p>
			<p>
				<input type="hidden" value="{$vo.id}" name="id" />
				
				<input class="button" type="reset" value="{%reset}" />
				<input class="button" type="submit" value="{%update}" />
			</p>
				</volist>
			</fieldset>
		</form>
	</div>
</div>
<include file="Public:footer" />